package com.gwt.client.login.client;
import java.awt.EventQueue;
import Server.Invoice;

import javax.swing.JFrame;
import javax.swing.JTextArea;
import java.awt.BorderLayout;
import javax.swing.JTextField;
import javax.swing.JLabel;
import javax.swing.SwingConstants;
import java.awt.TextArea;
import javax.swing.JButton;
import java.awt.Font;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;


public class InvoiceScreen {

	private static JFrame frame;
	private static Invoice iv = new Invoice();

	public static void setvisible(boolean b){
		frame.setVisible(b);
	}
	
	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					InvoiceScreen window = new InvoiceScreen();
					window.frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the application.
	 */
	public InvoiceScreen() {
		initialize();
	}

	/**
	 * Initialize the contents of the frame.
	 */
	private void initialize() {
		frame = new JFrame();
		frame.setBounds(100, 100, 450, 300);
		frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		
		JLabel Invoice = new JLabel("Patient Invoice");
		Invoice.setFont(new Font("Tahoma", Font.BOLD, 16));
		Invoice.setHorizontalAlignment(SwingConstants.CENTER);
		frame.getContentPane().add(Invoice, BorderLayout.NORTH);
		
		TextArea textArea = new TextArea();
		textArea.setText("Name : justin\r\nPrice : $60\r\nDate : 4/30/2011\r\nDoctor : walker\r\n");
		textArea.setEditable(false);
		frame.getContentPane().add(textArea, BorderLayout.CENTER);
		
		JButton btnBack = new JButton("Back");
		btnBack.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				frame.setVisible(false);
				frame.dispose();
			}
		});
		frame.getContentPane().add(btnBack, BorderLayout.SOUTH);
	}

}
